$OpenBSD: patch-gtkhtml_gtk-compat_h,v 1.1 2011/03/07 19:27:27 ajacoutot Exp $

From d085cd1cb81aab0767ab8276bef27b9ffdd832ed Mon Sep 17 00:00:00 2001
From: Matthew Barnes <mbarnes@redhat.com>
Date: Mon, 25 Oct 2010 23:06:32 +0000
Subject: Fix build issues.

From 3bf9eb43743cc1526802e0ce52b295e31e5a3c82 Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Wed, 20 Oct 2010 13:51:48 +0000
Subject: Bug 632601 - Handle combo box text API going away

--- gtkhtml/gtk-compat.h.orig	Mon Sep 13 14:16:10 2010
+++ gtkhtml/gtk-compat.h	Sat Feb 26 15:37:56 2011
@@ -5,6 +5,34 @@
 
 /* Provide a GTK+ compatibility layer. */
 
+#if !GTK_CHECK_VERSION (2,23,1)
+#define GTK_COMBO_BOX_TEXT		GTK_COMBO_BOX
+#define gtk_combo_box_text_new		gtk_combo_box_new_text
+#define gtk_combo_box_text_append_text	gtk_combo_box_append_text
+#endif
+
+#if !GTK_CHECK_VERSION (2,23,1)
+#define gdk_window_get_display		gdk_drawable_get_display
+#define gdk_window_get_visual		gdk_drawable_get_visual
+#endif
+
+/* For use with GTK+ key binding functions. */
+#if GTK_CHECK_VERSION (2,91,0)
+#define COMPAT_BINDING_TYPE	G_OBJECT
+#else
+#define COMPAT_BINDING_TYPE	GTK_OBJECT
+#endif
+
+#if !GTK_CHECK_VERSION (2,91,0)
+
+#define gtk_widget_get_preferred_size(widget, minimum_size, natural_size) \
+	(gtk_widget_size_request ((widget), (minimum_size)))
+
+#define gdk_window_set_background_pattern(window, pattern) \
+	(gdk_window_set_back_pixmap ((window), NULL, FALSE))
+
+#endif /* < 2.91.0 */
+
 #if GTK_CHECK_VERSION (2,90,5)
 
 /* Recreate GdkRegion until we drop GTK2 compatibility. */
@@ -20,6 +48,6 @@
 			cairo_region_union_rectangle ((region), (rect)); \
 	} G_STMT_END
 
-#endif
+#endif /* >= 2.90.5 */
 
 #endif /* __GTK_COMPAT_H__ */
